#!/bin/bash

# LTGSQL运行脚本
set -e

# 构建项目（如果需要）
if [ ! -f "./bin/ltgsql" ]; then
    echo "Binary not found, building..."
    ./scripts/build.sh
fi

# 创建数据目录
mkdir -p ltgsql_data

# 运行数据库
echo "Starting LTGSQL Database System..."
echo "Data directory: ./ltgsql_data"
echo "Press Ctrl+C to exit"
echo ""

./bin/ltgsql